<fieldset>
    <legend>{{$legend}}</legend>
    <div class="am-g am-margin-top">
        <div class="am-g am-margin-top">
            <div class="am-u-sm-4 am-u-md-2 am-text-right">
                {!! Form::label('parent_id','上级分类') !!}
            </div>
            <div class="am-u-sm-8 am-u-md-4 am-u-end col-end">
                {!! Form::select('parent_id', $cates, $category->parent_id, ['placeholder' => '顶级分类']) !!}
                {{--<select data-am-selected="{btnWidth: '100%',  btnStyle: 'secondary', btnSize: 'sm', maxHeight: 360, searchBox: 1}"--}}
                        {{--name="parent_id">--}}
                    {{--<option value="0">顶级分类</option>--}}
                    {{--@foreach($categories as $category)--}}
                    {{--<option value="{{$category->id}}">{{$category->name}}</option>--}}
                    {{--@endforeach--}}

                {{--</select>--}}
            </div>
        </div>

        <div class="am-g am-margin-top">
            <div class="am-u-sm-4 am-u-md-2 am-text-right">
                {!! Form::label('name','分类名称') !!}

            </div>
            <div class="am-u-sm-8 am-u-md-4">
                {!! Form::text('name',null,array('class'=>'am-input-sm','placeholder'=>"请输入分类名称")) !!}

            </div>
            <div class="am-hide-sm-only am-u-md-6">*必填，不可重复</div>
        </div>
    </div>

    <div class="am-g am-margin-top">
        <div class="am-u-sm-4 am-u-md-2 am-text-right">
            {!! Form::label('thumb','缩略图') !!}
        </div>

        <div class="am-u-sm-8 am-u-md-8 am-u-end col-end">
            <div class="am-form-group am-form-file new_thumb">
                <button type="button" class="am-btn am-btn-success am-btn-sm">
                    <i class="am-icon-cloud-upload" id="loading"></i> 上传新的缩略图
                </button>
                <input type="file" id="image_upload">
                <input type="hidden" name="thumb" value="{{$category->thumb}}">
            </div>

            <hr data-am-widget="divider" style="" class="am-divider am-divider-dashed"/>

            <div>
                <img src="{{$category->thumb}}" id="img_show" style="max-height: 200px;">
            </div>
        </div>
    </div>

    <div class="am-g am-margin-top">
        <div class="am-u-sm-4 am-u-md-2 am-text-right">
            {!! Form::label('sort_order','排序') !!}
        </div>
        <div class="am-u-sm-8 am-u-md-4">
            {!! Form::text('sort_order',null,array('class'=>'am-input-sm','placeholder'=>"请输入排序")) !!}
        </div>
        <div class="am-hide-sm-only am-u-md-6">选填</div>
    </div>

    <div class="am-g am-margin-top">
        <div class="am-u-sm-4 am-u-md-2 am-text-right">
            {!! Form::label('is_show','是否显示') !!}
        </div>
        <div class="am-u-sm-8 am-u-md-4 am-u-end col-end">
            <label class="am-radio-inline">
                {!! Form::radio('is_show',1,true) !!}是
            </label>
            <label class="am-radio-inline">
                {!! Form::radio('is_show',0) !!}否
            </label>
        </div>
    </div>

    <div class="am-g am-margin-top">
        <div class="am-u-sm-4 am-u-md-2 am-text-right">
            {!! Form::label('description','分类描述') !!}
        </div>
        <div class="am-u-sm-8 am-u-md-4 am-u-end col-end">
            {!! Form::textarea('description',null,array('class'=>'am-input-sm','placeholder'=>"请输入描述信息")) !!}
        </div>
    </div>

    <div class="am-margin">
        {!! Form::submit('提交保存',['class'=>'am-btn am-btn-primary am-btn-xs']) !!}
        {!! link_to_asset('/admin/crm/category','放弃保存',['class'=>'am-btn am-btn-primary am-btn-xs']) !!}
    </div>
</fieldset>
